export const getStyle=function (elm,attr,NumberMode = 'int') { 
    let value;
    if(attr === 'scrollTop'){
        value = elm.scrollTop
    }else if(elm.currentStyle){
        value = elm.currentStyle(attr)
    }else{
        value = document.defaultView.getComputedStyle(elm,null)[attr]; 
    }
    return NumberMode==='float'?parseFloat(value):parseInt(value);
}